package com.candy.util;

import com.candy.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client2 {
    public static void main(String[] args) {
//加载容器
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
//        实例化bean
          AccountService accountService= (AccountService) ac.getBean("accountService1");

        System.out.println(accountService);
        accountService.saveAccount();

    }
}
